(function ( $ ) {
jQuery(document).ready(function() {

	$("a").each(function(index) {
		if($(this).attr('href')=='#')
		{
			 $(this).attr('href','javascript:void(0)');
		}
	});


	$('.wrapper').fullpage({
		verticalCentered:false,
		responsive: false,
		fitToSection: false,
		resize: false,
		anchors:['home', 'about', 'works', 'category', 'contact'],
		scrollingSpeed: 0
	})
	
	preloadImg();
	function preloadImg(){
		$('.preloadBgImg img').load(function(){
			$(this).hide();
			if($(this).closest('.preloadBgImg').attr("data-loaded") == "true")
			{
				$(this).closest('.preloadBgImg').fadeTo(800, 1);
			}else{
				$(this).closest('.preloadBgImg').attr("data-loaded","true");
			}
		}).attr('src',$(this).attr("data-src"));
	}
	
	
	
	homeAni();
	
	function homeAni(){
		
		$('.section1 .logo').fadeIn(600);
		$('.section1 .leftBorder').delay(300).fadeIn(800);
		$('.aniThree').delay(800).fadeTo(800, 1);
		$('.btnNextPage').delay(1500).fadeTo(300, 1);
		
		setTimeout(function(){
			if($('.bgColorGrey').attr("data-loaded") == "true")
			{
				$('.bgColorGrey').fadeTo(800, 1);
			}else{
				$('.bgColorGrey').attr("data-loaded","true");
			}
			$.fn.fullpage.setScrollingSpeed(700);
		},2000)
		
		setTimeout(function(){
			$('.bgTxt').delay(1000).addClass('taglineAni');	
			
		},500)
	}
	

	
	var testEl = document.createElement( "x-test" );
	var supportsWebkitBackgroundClipText = typeof testEl.style.webkitBackgroundClip !== "undefined" && ( testEl.style.webkitBackgroundClip = "text", testEl.style.webkitBackgroundClip === "text" );
	if(supportsWebkitBackgroundClipText)
	{
		$('body').addClass('backgroundClip');
	}else
	{
		$('body').addClass('no-backgroundClip');
	}
			

		
	$('.sliderWrap').rotateInit(0,0,8000,false);
	
	
	
	$('.btnBefore').hover(
		function(){
			$('.sliderBanner.active .workBefore').stop(true,true).fadeIn(500);
		},
		function(){
			
		}
	)
			
	$('.btnAfter').hover(
		function(){
			$('.sliderBanner.active .workBefore').stop(true,true).fadeOut(500);
		},
		function(){
			
		}
	)
	
	
	
	$('.servicesBox').hover(
		function(){
			$('.servicesBox').removeClass('active');
			$(this).addClass('active');
		},
		function(){
			
		}
	)
	
	
	

	
	
	
	
});
}( jQuery ));








//